package com.org.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author Hao
 */
public class RoleDto extends Page implements Serializable {

    @TableId(value = "role_id", type = IdType.AUTO)
    private Long roleId;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 备注
     */
    private String remark;

    /**
     * 部门ID
     */
    private Long deptId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:dd:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:dd:ss")
    private Date createTime;

    private Integer menuIds[];

    private Integer deptIds[];

    private MenuDto roleDept;

    private List<UserDto> roleUsers;

    private String rname;

    @Override
    public String toString() {
        return "RoleDto{" +
                "roleId=" + roleId +
                ", roleName='" + roleName + '\'' +
                ", remark='" + remark + '\'' +
                ", deptId=" + deptId +
                ", createTime=" + createTime +
                ", menuIds=" + Arrays.toString(menuIds) +
                ", deptIds=" + Arrays.toString(deptIds) +
                ", roleDept=" + roleDept +
                ", roleUsers=" + roleUsers +
                '}';
    }

    public String getRname() {
        return rname;
    }

    public void setRname(String rname) {
        this.rname = rname;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer[] getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(Integer[] menuIds) {
        this.menuIds = menuIds;
    }

    public Integer[] getDeptIds() {
        return deptIds;
    }

    public void setDeptIds(Integer[] deptIds) {
        this.deptIds = deptIds;
    }

    public MenuDto getRoleDept() {
        return roleDept;
    }

    public void setRoleDept(MenuDto roleDept) {
        this.roleDept = roleDept;
    }

    public List<UserDto> getRoleUsers() {
        return roleUsers;
    }

    public void setRoleUsers(List<UserDto> roleUsers) {
        this.roleUsers = roleUsers;
    }
}
